<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title>学生端填写实验报告</title>
<script src="${basePath}js/jquery.js"></script>
<script src="${basePath}js/pintuer.js"></script>
<script src="${basePath}js/jquery.min.js"></script>
<script type="text/javascript" src="${basePath}js/bootstrap-select.js"></script>
<link rel="stylesheet" type="text/css"
	href="${basePath}css/bootstrap-select.css">
<link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css"
	rel="stylesheet">
<script src="${basePath}js/bootstrap.min.js"></script>
<script type="text/javascript">
	$(window).on('load', function() {
		$('.selectpicker').selectpicker({
			'selectedText' : 'cat'
		});
	});
</script>
<script type="text/javascript">
	$(function() {
		$("#revise").click(function() {
			javascript: history.go(-1);
		})
	})
</script>
<script type="text/javascript">
	$(function() {
		if ($("#repScore").val() != '') {
			$("textarea").attr("readonly", "readonly");
			$("#submit").hide();
		}
	})
</script>
<script type="text/javascript">
	(
					function($) {
						// tipWrap: 提示消息的容器
						// maxNumber: 最大输入字符
						$.fn.artTxtCount = function(tipWrap, maxNumber) {
							var countClass = 'js_txtCount',
							// 定义内部容器的CSS类名
							fullClass = 'js_txtFull',
							// 定义超出字符的CSS类名
							disabledClass = 'disabled'; // 定义不可用提交按钮CSS类名
							// 统计字数
							var count = function() {
								var btn = $(this).closest('form').find(
										':submit'), val = $(this).val().length,
								// 是否禁用提交按钮
								disabled = {
									on : function() {
										btn.removeAttr('disabled').removeClass(
												disabledClass);
									},
									off : function() {
										btn.attr('disabled', 'disabled')
												.addClass(disabledClass);
									}
								};
								if (val == 0)
									disabled.off();
								if (val <= maxNumber) {
									if (val > 0)
										disabled.on();
									tipWrap
											.html('<span class="' + countClass + '">\u8FD8\u80FD\u8F93\u5165 <strong>'
													+ (maxNumber - val)
													+ '</strong> \u4E2A\u5B57</span>');
								} else {
									disabled.off();
									tipWrap
											.html('<span class="' + countClass + ' ' + fullClass + '">\u5DF2\u7ECF\u8D85\u51FA <strong>'
													+ (val - maxNumber)
													+ '</strong> \u4E2A\u5B57</span>');
								}
								;
							};
							$(this).bind('keyup change', count);
							return this;
						};
					})(jQuery);
	// demo
	jQuery(function() {
		// 批量
		$('.form-group').each(
				function() {
					$(this).find('#expObjective').artTxtCount(
							$(this).find('.tips'), 1000);
					$(this).find('#expEquip').artTxtCount(
							$(this).find('.tips'), 1000);
					$(this).find('#expContent').artTxtCount(
							$(this).find('.tips'), 1000);
					$(this).find('#expRequire').artTxtCount(
							$(this).find('.tips'), 1000);
				});

	});
</script>

<link rel="stylesheet" href="css/pintuer.css">
<link rel="stylesheet" href="css/admin.css">
</head>
<body>
	<div class="panel admin-panel">
		<div class="panel-head">
			<strong><span class="icon-pencil-square-o"></span>天津理工大学电子实验报告--学生端</strong>
			<span style="margin-left: 80%"><a id="revise" href="#">返回</a></span>
		</div>
		<div class="body-content">
			<form method="post" class="form-x" action="saveReport.do"
				enctype="multipart/form-data">

				<input type="hidden" name="stuId" value="${requestScope.stuB.stuId}">

				<div class="form-group">
					<div class="label">
						<label>姓名：</label>
					</div>
					<div class="field">
						<input id="stuName" type="text" class="input" name="stuName"
							value="${requestScope.stuB.stuName}" readonly="readonly" />
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>学号：</label>
					</div>
					<div class="field">
						<input id="stuId" type="text" class="input" name="stuId"
							value="${requestScope.stuB.stuId}" readonly="readonly" />
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>班级：</label>
					</div>
					<div class="field">
						<input id="stuClass" type="text" class="input" name="stuClass"
							value="${requestScope.stuB.stuClass}" readonly="readonly" />
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>实验名称：</label>
					</div>
					<div class="field">
						<input id="expName" type="text" class="input" name="expName"
							value="${requestScope.expB.expName}" readonly="readonly" />
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>课程名称：</label>
					</div>
					<div class="field">
						<input id="expClass" type="text" class="input" name="expClass"
							value="${requestScope.expB.expClass}" readonly="readonly" />
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>课程代码：</label>
					</div>
					<div class="field">
						<input id="expId" type="text" class="input" name="expId"
							value="${requestScope.expB.expId}" readonly="readonly" />
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>实验时间：</label>
					</div>
					<div class="field">
						<input id="repTime" type="text" class="input" name="repTime"
							value="${requestScope.expB.expBtime}" readonly="readonly" />
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>实验地点：</label>
					</div>
					<div class="field">
						<input id="expAdd" type="text" class="input" name="expAdd"
							value="${requestScope.expB.expAdd}" readonly="readonly" />
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>成绩：</label>
					</div>
					<div class="field">
						<input id="repScore" type="text" class="input" name="repScore"
							readonly="readonly" />
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>实验教师：</label>
					</div>
					<div class="field">
						<input id="teaName" type="text" class="input" name="teaName"
							value="${requestScope.expB.teaName}" readonly="readonly" />
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>批改意见：</label>
					</div>
					<div class="field">
						<textarea id="repOpinion" type="text" class="input"
							name="repOpinion" style="height: 60px;" readonly="readonly"></textarea>
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>实验目的：</label>
					</div>
					<div class="field">
						<textarea id="expObjective" type="text" class="input"
							name="expObjective" style="height: 120px;"></textarea>
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>实验器材：</label>
					</div>
					<div class="field">
						<textarea id="expEquip" type="text" class="input" name="expEquip"
							style="height: 120px;"></textarea>
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>实验内容与步骤：</label>
					</div>
					<div class="field">
						<textarea id="expContent" type="text" class="input"
							name="expContent" style="height: 120px;"></textarea>
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>实验要求：</label>
					</div>
					<div class="field">
						<textarea id="expRequire" type="text" class="input"
							name="expRequire" style="height: 120px;"></textarea>
						<div class="tips"></div>
					</div>
				</div>
				<div class="form-group">
					<div class="label">
						<label>实验数据：</label>
					</div>
					<div class="field">
						<textarea id="repData" type="text" class="input" name="repData"
							style="height: 120px;"></textarea>
						<div class="tips"></div>
					</div>
				</div>
				<!-- 上传文件 -->
				<div class="form-group">
					<div class="label">
						<label>上传文件：</label>
					</div>
					<div class="field">
						<input type="file" name="file" class="button bg-blue margin-left"
							id="file">
					</div>
				</div>
				<div class="form-group" id="submit">
					<div class="label">
						<label></label>
					</div>
					<div class="field">
						<button class="button bg-main icon-check-square-o" type="submit"
							id="submit">提交</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</body>
</html>